#define _CRT_SECURE_NO_WARNINGS

#include<iostream>
#include<cmath>
#include<climits>
using namespace std;

int x;

int main1()
{
	int n = 0;
	cin >> n;
	int min = INT_MAX;
	for (int i = 1; i <= n; i++)
	{
		cin >> x;
		min = fmin(min, x);
	}
	cout << min << endl;

	return 0;
}
